#include "index.h"
#include "ui_index.h"

index::index(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::index)
{
    ui->setupUi(this);
    this->setMaximumSize(1280,960);
    this->setMinimumSize(1280,960);
    this->resize(1280,960);
}

index::~index()
{
    delete ui;
}


void index::on_log_in_clicked()
{
    if(cheakUser(ui->account->text())){
        if(cheakPassword(ui->password->text())){
            emit log_in_ok(true);
            this->close();
        }
        else
            QMessageBox::warning(this,"提示","密码不正确",QMessageBox::Ok);
    }
    else
         QMessageBox::warning(this,"提示","用户不存在",QMessageBox::Ok);

}
bool index::cheakUser(QString str){
    return true;
}
bool index::cheakPassword(QString str){
    return true;
}
